package cn.zhukelili.expand;

/**
 * @description: 场景类
 * @author: hhbeast
 * @since: 2018/7/28 15:24
 */
public class Client {
    public static void main(String[] args) {
//在对象池中初始化4个对象
        SignInfoFactory.getSignInfo("科目1");
        SignInfoFactory.getSignInfo("科目2");
        SignInfoFactory.getSignInfo("科目3");
        SignInfoFactory.getSignInfo("科目4");
//取得对象
        SignInfo signInfo = SignInfoFactory.getSignInfo("科目2");
        while (true) {
            signInfo.setId("ZhangSan");
            signInfo.setLocation("ZhangSan");
            (new MultiThread(signInfo)).start();
            signInfo.setId("LiSi");
            signInfo.setLocation("LiSi");
            (new MultiThread(signInfo)).start();
        }
    }
}

/*
模拟实际的多线程情况，在对象池中我们保留4个对象，然后启动N多个线程来模拟

 */
